/*
	Designer: DaBai 
	E-mail: jamesbaicn@gmail.com
	Last Modified: #2010-01-20 22:50#
	License: GNU GENERAL PUBLIC LICENSE Version 3

	Reference Table of the return value of getDirection():
	0: stop;
	1: Left;
	2: Left Down;
	3: Down;
	4: Right Down;
	5: Right;
	6: Right Up;
	7: Up;
	8: Left Up;
*/
#ifndef __direction_ctrl__
#define __direction_ctrl__

extern struct coordinate{
	float x;
	float y;
};

unsigned char getDirection(struct coordinate MotorPos, struct coordinate NextPos);
void dUp(void);
void dUpRight(void);
void dRight(void);
void dDownRight(void);
void dDown(void);
void dDownLeft(void);
void dLeft(void);
void dUpLeft(void);
void dStop(void);

#endif